package com.tuozixuan.forest.api;

import java.util.List;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.tuozixuan.forest.dto.UserDTO;

@RequestMapping("/user")
public interface UserApi {

	@GetMapping("/getUserNameById")
	String getUserNameById(@RequestParam String id);
	
	@GetMapping("/getUserNamesByIds")
	List<String> getUserNamesByIds(@RequestParam String[] ids);
	
	@PostMapping("/addUser")
	boolean addUser(@RequestBody UserDTO userDTO);
	
	@PostMapping("/addUserWithException")
	boolean addUserWithException(@RequestBody UserDTO userDTO);
}
